home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / Drag.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  22.3 KB  |  599 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Drag.h
  3.  
  4.      Contains:    Drag and Drop Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1992-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __DRAG__
  19. #define __DRAG__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __EVENTS__
  25. #include <Events.h>
  26. #endif
  27. #ifndef __FILES__
  28. #include <Files.h>
  29. #endif
  30. #ifndef __APPLEEVENTS__
  31. #include <AppleEvents.h>
  32. #endif
  33. #ifndef __QUICKDRAW__
  34. #include <Quickdraw.h>
  35. #endif
  36.  
  37.  
  38.  
  39. #if PRAGMA_ONCE
  40. #pragma once
  41. #endif
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT
  48. #pragma import on
  49. #endif
  50.  
  51. #if PRAGMA_STRUCT_ALIGN
  52.     #pragma options align=mac68k
  53. #elif PRAGMA_STRUCT_PACKPUSH
  54.     #pragma pack(push, 2)
  55. #elif PRAGMA_STRUCT_PACK
  56.     #pragma pack(2)
  57. #endif
  58.  
  59. /*
  60.   _________________________________________________________________________________________________________
  61.       
  62.    • DRAG MANAGER DATA TYPES
  63.   _________________________________________________________________________________________________________
  64. */
  65. typedef struct OpaqueDragReference*     DragReference;
  66. typedef UInt32                             ItemReference;
  67. typedef OSType                             FlavorType;
  68. /*
  69.   _________________________________________________________________________________________________________
  70.       
  71.    • DRAG ATTRIBUTES
  72.   _________________________________________________________________________________________________________
  73. */
  74.  
  75. typedef OptionBits                         DragAttributes;
  76.  
  77. enum {
  78.     kDragHasLeftSenderWindow    = (1L << 0),                    /* drag has left the source window since TrackDrag*/
  79.     kDragInsideSenderApplication = (1L << 1),                    /* drag is occurring within the sender application*/
  80.     kDragInsideSenderWindow        = (1L << 2)                        /* drag is occurring within the sender window*/
  81. };
  82.  
  83. /*
  84.   _________________________________________________________________________________________________________
  85.       
  86.    • DRAG IMAGE FLAGS
  87.   _________________________________________________________________________________________________________
  88. */
  89.  
  90. typedef OptionBits                         DragImageFlags;
  91.  
  92. enum {
  93.     kDragRegionAndImage            = (1L << 4)                        /* drag region and image*/
  94. };
  95.  
  96. /*
  97.   _________________________________________________________________________________________________________
  98.       
  99.    • DRAG IMAGE TRANSLUCENCY LEVELS
  100.   _________________________________________________________________________________________________________
  101. */
  102.  
  103. typedef UInt32                             DragImageTranslucency;
  104.  
  105. enum {
  106.     kDragStandardTranslucency    = 0L,                            /* 65% image translucency (standard)*/
  107.     kDragDarkTranslucency        = 1L,                            /* 50% image translucency*/
  108.     kDragDarkerTranslucency        = 2L,                            /* 25% image translucency*/
  109.     kDragOpaqueTranslucency        = 3L                            /* 0% image translucency (opaque)*/
  110. };
  111.  
  112. /*
  113.   _________________________________________________________________________________________________________
  114.       
  115.    • DRAG DRAWING PROCEDURE MESSAGES
  116.   _________________________________________________________________________________________________________
  117. */
  118.  
  119. typedef SInt16                             DragRegionMessage;
  120.  
  121. enum {
  122.     kDragRegionBegin            = 1,                            /* initialize drawing*/
  123.     kDragRegionDraw                = 2,                            /* draw drag feedback*/
  124.     kDragRegionHide                = 3,                            /* hide drag feedback*/
  125.     kDragRegionIdle                = 4,                            /* drag feedback idle time*/
  126.     kDragRegionEnd                = 5                                /* end of drawing*/
  127. };
  128.  
  129. /*
  130.   _________________________________________________________________________________________________________
  131.       
  132.    • ZOOM ACCELERATION
  133.   _________________________________________________________________________________________________________
  134. */
  135.  
  136. typedef SInt16                             ZoomAcceleration;
  137.  
  138. enum {
  139.     kZoomNoAcceleration            = 0,                            /* use linear interpolation*/
  140.     kZoomAccelerate                = 1,                            /* ramp up step size*/
  141.     kZoomDecelerate                = 2                                /* ramp down step size*/
  142. };
  143.  
  144. /*
  145.   _________________________________________________________________________________________________________
  146.       
  147.    • FLAVOR FLAGS
  148.   _________________________________________________________________________________________________________
  149. */
  150.  
  151. typedef OptionBits                         FlavorFlags;
  152.  
  153. enum {
  154.     flavorSenderOnly            = (1 << 0),                        /* flavor is available to sender only*/
  155.     flavorSenderTranslated        = (1 << 1),                        /* flavor is translated by sender*/
  156.     flavorNotSaved                = (1 << 2),                        /* flavor should not be saved*/
  157.     flavorSystemTranslated        = (1 << 8)                        /* flavor is translated by system*/
  158. };
  159.  
  160. /*
  161.   _________________________________________________________________________________________________________
  162.       
  163.    • SPECIAL FLAVORS
  164.   _________________________________________________________________________________________________________
  165. */
  166.  
  167.  
  168. enum {
  169.     flavorTypeHFS                = FOUR_CHAR_CODE('hfs '),        /* flavor type for HFS data*/
  170.     flavorTypePromiseHFS        = FOUR_CHAR_CODE('phfs'),        /* flavor type for promised HFS data*/
  171.     flavorTypeDirectory            = FOUR_CHAR_CODE('diry')        /* flavor type for AOCE directories*/
  172. };
  173.  
  174. /*
  175.   _________________________________________________________________________________________________________
  176.       
  177.    • DRAG TRACKING HANDLER MESSAGES
  178.   _________________________________________________________________________________________________________
  179. */
  180.  
  181. typedef SInt16                             DragTrackingMessage;
  182.  
  183. enum {
  184.     kDragTrackingEnterHandler    = 1,                            /* drag has entered handler*/
  185.     kDragTrackingEnterWindow    = 2,                            /* drag has entered window*/
  186.     kDragTrackingInWindow        = 3,                            /* drag is moving within window*/
  187.     kDragTrackingLeaveWindow    = 4,                            /* drag has exited window*/
  188.     kDragTrackingLeaveHandler    = 5                                /* drag has exited handler*/
  189. };
  190.  
  191. /*
  192.   _________________________________________________________________________________________________________
  193.       
  194.    • HFS FLAVORS
  195.   _________________________________________________________________________________________________________
  196. */
  197.  
  198. struct HFSFlavor {
  199.     OSType                             fileType;                    /* file type */
  200.     OSType                             fileCreator;                /* file creator */
  201.     UInt16                             fdFlags;                    /* Finder flags */
  202.     FSSpec                             fileSpec;                    /* file system specification */
  203. };
  204. typedef struct HFSFlavor HFSFlavor;
  205.  
  206. struct PromiseHFSFlavor {
  207.     OSType                             fileType;                    /* file type */
  208.     OSType                             fileCreator;                /* file creator */
  209.     UInt16                             fdFlags;                    /* Finder flags */
  210.     FlavorType                         promisedFlavor;                /* promised flavor containing an FSSpec */
  211. };
  212. typedef struct PromiseHFSFlavor PromiseHFSFlavor;
  213.  
  214. /*
  215.   _________________________________________________________________________________________________________
  216.       
  217.    • APPLICATION-DEFINED DRAG HANDLER ROUTINES
  218.   _________________________________________________________________________________________________________
  219. */
  220. typedef CALLBACK_API( OSErr , DragTrackingHandlerProcPtr )(DragTrackingMessage message, WindowPtr theWindow, void *handlerRefCon, DragReference theDrag);
  221. typedef CALLBACK_API( OSErr , DragReceiveHandlerProcPtr )(WindowPtr theWindow, void *handlerRefCon, DragReference theDrag);
  222. typedef STACK_UPP_TYPE(DragTrackingHandlerProcPtr)                 DragTrackingHandlerUPP;
  223. typedef STACK_UPP_TYPE(DragReceiveHandlerProcPtr)                 DragReceiveHandlerUPP;
  224. enum { uppDragTrackingHandlerProcInfo = 0x00003FA0 };             /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes, 4_bytes) */
  225. enum { uppDragReceiveHandlerProcInfo = 0x00000FE0 };             /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  226. #define NewDragTrackingHandlerProc(userRoutine)                 (DragTrackingHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragTrackingHandlerProcInfo, GetCurrentArchitecture())
  227. #define NewDragReceiveHandlerProc(userRoutine)                     (DragReceiveHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragReceiveHandlerProcInfo, GetCurrentArchitecture())
  228. #define CallDragTrackingHandlerProc(userRoutine, message, theWindow, handlerRefCon, theDrag)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppDragTrackingHandlerProcInfo, (message), (theWindow), (handlerRefCon), (theDrag))
  229. #define CallDragReceiveHandlerProc(userRoutine, theWindow, handlerRefCon, theDrag)  CALL_THREE_PARAMETER_UPP((userRoutine), uppDragReceiveHandlerProcInfo, (theWindow), (handlerRefCon), (theDrag))
  230. /*
  231.   _________________________________________________________________________________________________________
  232.       
  233.    • APPLICATION-DEFINED ROUTINES
  234.   _________________________________________________________________________________________________________
  235. */
  236. typedef CALLBACK_API( OSErr , DragSendDataProcPtr )(FlavorType theType, void *dragSendRefCon, ItemReference theItemRef, DragReference theDrag);
  237. typedef CALLBACK_API( OSErr , DragInputProcPtr )(Point *mouse, SInt16 *modifiers, void *dragInputRefCon, DragReference theDrag);
  238. typedef CALLBACK_API( OSErr , DragDrawingProcPtr )(DragRegionMessage message, RgnHandle showRegion, Point showOrigin, RgnHandle hideRegion, Point hideOrigin, void *dragDrawingRefCon, DragReference theDrag);
  239. typedef STACK_UPP_TYPE(DragSendDataProcPtr)                     DragSendDataUPP;
  240. typedef STACK_UPP_TYPE(DragInputProcPtr)                         DragInputUPP;
  241. typedef STACK_UPP_TYPE(DragDrawingProcPtr)                         DragDrawingUPP;
  242. enum { uppDragSendDataProcInfo = 0x00003FE0 };                     /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  243. enum { uppDragInputProcInfo = 0x00003FE0 };                     /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  244. enum { uppDragDrawingProcInfo = 0x000FFFA0 };                     /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  245. #define NewDragSendDataProc(userRoutine)                         (DragSendDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragSendDataProcInfo, GetCurrentArchitecture())
  246. #define NewDragInputProc(userRoutine)                             (DragInputUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragInputProcInfo, GetCurrentArchitecture())
  247. #define NewDragDrawingProc(userRoutine)                         (DragDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragDrawingProcInfo, GetCurrentArchitecture())
  248. #define CallDragSendDataProc(userRoutine, theType, dragSendRefCon, theItemRef, theDrag)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppDragSendDataProcInfo, (theType), (dragSendRefCon), (theItemRef), (theDrag))
  249. #define CallDragInputProc(userRoutine, mouse, modifiers, dragInputRefCon, theDrag)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppDragInputProcInfo, (mouse), (modifiers), (dragInputRefCon), (theDrag))
  250. #define CallDragDrawingProc(userRoutine, message, showRegion, showOrigin, hideRegion, hideOrigin, dragDrawingRefCon, theDrag)  CALL_SEVEN_PARAMETER_UPP((userRoutine), uppDragDrawingProcInfo, (message), (showRegion), (showOrigin), (hideRegion), (hideOrigin), (dragDrawingRefCon), (theDrag))
  251. /*
  252.   _________________________________________________________________________________________________________
  253.       
  254.    • INSTALLING AND REMOVING HANDLERS API'S
  255.   _________________________________________________________________________________________________________
  256. */
  257.  
  258. EXTERN_API( OSErr )
  259. InstallTrackingHandler            (DragTrackingHandlerUPP  trackingHandler,
  260.                                  WindowPtr                 theWindow,
  261.                                  void *                    handlerRefCon)                        TWOWORDINLINE(0x7001, 0xABED);
  262.  
  263. EXTERN_API( OSErr )
  264. InstallReceiveHandler            (DragReceiveHandlerUPP     receiveHandler,
  265.                                  WindowPtr                 theWindow,
  266.                                  void *                    handlerRefCon)                        TWOWORDINLINE(0x7002, 0xABED);
  267.  
  268. EXTERN_API( OSErr )
  269. RemoveTrackingHandler            (DragTrackingHandlerUPP  trackingHandler,
  270.                                  WindowPtr                 theWindow)                            TWOWORDINLINE(0x7003, 0xABED);
  271.  
  272. EXTERN_API( OSErr )
  273. RemoveReceiveHandler            (DragReceiveHandlerUPP     receiveHandler,
  274.                                  WindowPtr                 theWindow)                            TWOWORDINLINE(0x7004, 0xABED);
  275.  
  276. /*
  277.   _________________________________________________________________________________________________________
  278.       
  279.    • CREATING & DISPOSING
  280.   _________________________________________________________________________________________________________
  281. */
  282.  
  283. EXTERN_API( OSErr )
  284. NewDrag                            (DragReference *        theDrag)                            TWOWORDINLINE(0x7005, 0xABED);
  285.  
  286. EXTERN_API( OSErr )
  287. DisposeDrag                        (DragReference             theDrag)                            TWOWORDINLINE(0x7006, 0xABED);
  288.  
  289. /*
  290.   _________________________________________________________________________________________________________
  291.       
  292.    • ADDING DRAG ITEM FLAVORS
  293.   _________________________________________________________________________________________________________
  294. */
  295.  
  296. EXTERN_API( OSErr )
  297. AddDragItemFlavor                (DragReference             theDrag,
  298.                                  ItemReference             theItemRef,
  299.                                  FlavorType             theType,
  300.                                  const void *            dataPtr,
  301.                                  Size                     dataSize,
  302.                                  FlavorFlags             theFlags)                            TWOWORDINLINE(0x7007, 0xABED);
  303.  
  304. EXTERN_API( OSErr )
  305. SetDragItemFlavorData            (DragReference             theDrag,
  306.                                  ItemReference             theItemRef,
  307.                                  FlavorType             theType,
  308.                                  const void *            dataPtr,
  309.                                  Size                     dataSize,
  310.                                  UInt32                 dataOffset)                            TWOWORDINLINE(0x7009, 0xABED);
  311.  
  312. /*
  313.   _________________________________________________________________________________________________________
  314.       
  315.    • PROVIDING CALLBACK PROCEDURES
  316.   _________________________________________________________________________________________________________
  317. */
  318.  
  319. EXTERN_API( OSErr )
  320. SetDragSendProc                    (DragReference             theDrag,
  321.                                  DragSendDataUPP         sendProc,
  322.                                  void *                    dragSendRefCon)                        TWOWORDINLINE(0x700A, 0xABED);
  323.  
  324.  
  325. EXTERN_API( OSErr )
  326. SetDragInputProc                (DragReference             theDrag,
  327.                                  DragInputUPP             inputProc,
  328.                                  void *                    dragInputRefCon)                    TWOWORDINLINE(0x700B, 0xABED);
  329.  
  330. EXTERN_API( OSErr )
  331. SetDragDrawingProc                (DragReference             theDrag,
  332.                                  DragDrawingUPP         drawingProc,
  333.                                  void *                    dragDrawingRefCon)                    TWOWORDINLINE(0x700C, 0xABED);
  334.  
  335. /*
  336.   _________________________________________________________________________________________________________
  337.       
  338.    • SETTING THE DRAG IMAGE
  339.   _________________________________________________________________________________________________________
  340. */
  341.  
  342. EXTERN_API( OSErr )
  343. SetDragImage                    (DragReference             theDrag,
  344.                                  PixMapHandle             imagePixMap,
  345.                                  RgnHandle                 imageRgn,
  346.                                  Point                     imageOffsetPt,
  347.                                  DragImageFlags         theImageFlags)                        TWOWORDINLINE(0x7027, 0xABED);
  348.  
  349. /*
  350.   _________________________________________________________________________________________________________
  351.       
  352.    • PERFORMING A DRAG
  353.   _________________________________________________________________________________________________________
  354. */
  355.  
  356. EXTERN_API( OSErr )
  357. TrackDrag                        (DragReference             theDrag,
  358.                                  const EventRecord *    theEvent,
  359.                                  RgnHandle                 theRegion)                            TWOWORDINLINE(0x700D, 0xABED);
  360.  
  361. /*
  362.   _________________________________________________________________________________________________________
  363.       
  364.    • GETTING DRAG ITEM INFORMATION
  365.   _________________________________________________________________________________________________________
  366. */
  367.  
  368. EXTERN_API( OSErr )
  369. CountDragItems                    (DragReference             theDrag,
  370.                                  UInt16 *                numItems)                            TWOWORDINLINE(0x700E, 0xABED);
  371.  
  372. EXTERN_API( OSErr )
  373. GetDragItemReferenceNumber        (DragReference             theDrag,
  374.                                  UInt16                 index,
  375.                                  ItemReference *        theItemRef)                            TWOWORDINLINE(0x700F, 0xABED);
  376.  
  377. EXTERN_API( OSErr )
  378. CountDragItemFlavors            (DragReference             theDrag,
  379.                                  ItemReference             theItemRef,
  380.                                  UInt16 *                numFlavors)                            TWOWORDINLINE(0x7010, 0xABED);
  381.  
  382. EXTERN_API( OSErr )
  383. GetFlavorType                    (DragReference             theDrag,
  384.                                  ItemReference             theItemRef,
  385.                                  UInt16                 index,
  386.                                  FlavorType *            theType)                            TWOWORDINLINE(0x7011, 0xABED);
  387.  
  388. EXTERN_API( OSErr )
  389. GetFlavorFlags                    (DragReference             theDrag,
  390.                                  ItemReference             theItemRef,
  391.                                  FlavorType             theType,
  392.                                  FlavorFlags *            theFlags)                            TWOWORDINLINE(0x7012, 0xABED);
  393.  
  394. EXTERN_API( OSErr )
  395. GetFlavorDataSize                (DragReference             theDrag,
  396.                                  ItemReference             theItemRef,
  397.                                  FlavorType             theType,
  398.                                  Size *                    dataSize)                            TWOWORDINLINE(0x7013, 0xABED);
  399.  
  400. EXTERN_API( OSErr )
  401. GetFlavorData                    (DragReference             theDrag,
  402.                                  ItemReference             theItemRef,
  403.                                  FlavorType             theType,
  404.                                  void *                    dataPtr,
  405.                                  Size *                    dataSize,
  406.                                  UInt32                 dataOffset)                            TWOWORDINLINE(0x7014, 0xABED);
  407.  
  408. /*
  409.   _________________________________________________________________________________________________________
  410.       
  411.    • DRAG ITEM BOUNDS
  412.   _________________________________________________________________________________________________________
  413. */
  414.  
  415. EXTERN_API( OSErr )
  416. GetDragItemBounds                (DragReference             theDrag,
  417.                                  ItemReference             theItemRef,
  418.                                  Rect *                    itemBounds)                            TWOWORDINLINE(0x7015, 0xABED);
  419.  
  420. EXTERN_API( OSErr )
  421. SetDragItemBounds                (DragReference             theDrag,
  422.                                  ItemReference             theItemRef,
  423.                                  const Rect *            itemBounds)                            TWOWORDINLINE(0x7016, 0xABED);
  424.  
  425. /*
  426.   _________________________________________________________________________________________________________
  427.       
  428.    • DROP LOCATIONS
  429.   _________________________________________________________________________________________________________
  430. */
  431.  
  432. EXTERN_API( OSErr )
  433. GetDropLocation                    (DragReference             theDrag,
  434.                                  AEDesc *                dropLocation)                        TWOWORDINLINE(0x7017, 0xABED);
  435.  
  436. EXTERN_API( OSErr )
  437. SetDropLocation                    (DragReference             theDrag,
  438.                                  const AEDesc *            dropLocation)                        TWOWORDINLINE(0x7018, 0xABED);
  439.  
  440. /*
  441.   _________________________________________________________________________________________________________
  442.       
  443.    • GETTING INFORMATION ABOUT A DRAG
  444.   _________________________________________________________________________________________________________
  445. */
  446.  
  447. EXTERN_API( OSErr )
  448. GetDragAttributes                (DragReference             theDrag,
  449.                                  DragAttributes *        flags)                                TWOWORDINLINE(0x7019, 0xABED);
  450.  
  451. EXTERN_API( OSErr )
  452. GetDragMouse                    (DragReference             theDrag,
  453.                                  Point *                mouse,
  454.                                  Point *                globalPinnedMouse)                    TWOWORDINLINE(0x701A, 0xABED);
  455.  
  456. EXTERN_API( OSErr )
  457. SetDragMouse                    (DragReference             theDrag,
  458.                                  Point                     globalPinnedMouse)                    TWOWORDINLINE(0x701B, 0xABED);
  459.  
  460. EXTERN_API( OSErr )
  461. GetDragOrigin                    (DragReference             theDrag,
  462.                                  Point *                globalInitialMouse)                    TWOWORDINLINE(0x701C, 0xABED);
  463.  
  464. EXTERN_API( OSErr )
  465. GetDragModifiers                (DragReference             theDrag,
  466.                                  SInt16 *                modifiers,
  467.                                  SInt16 *                mouseDownModifiers,
  468.                                  SInt16 *                mouseUpModifiers)                    TWOWORDINLINE(0x701D, 0xABED);
  469.  
  470. /*
  471.   _________________________________________________________________________________________________________
  472.       
  473.    • DRAG HIGHLIGHTING
  474.   _________________________________________________________________________________________________________
  475. */
  476.  
  477. EXTERN_API( OSErr )
  478. ShowDragHilite                    (DragReference             theDrag,
  479.                                  RgnHandle                 hiliteFrame,
  480.                                  Boolean                 inside)                                TWOWORDINLINE(0x701E, 0xABED);
  481.  
  482. EXTERN_API( OSErr )
  483. HideDragHilite                    (DragReference             theDrag)                            TWOWORDINLINE(0x701F, 0xABED);
  484.  
  485. EXTERN_API( OSErr )
  486. DragPreScroll                    (DragReference             theDrag,
  487.                                  SInt16                 dH,
  488.                                  SInt16                 dV)                                    TWOWORDINLINE(0x7020, 0xABED);
  489.  
  490. EXTERN_API( OSErr )
  491. DragPostScroll                    (DragReference             theDrag)                            TWOWORDINLINE(0x7021, 0xABED);
  492.  
  493. EXTERN_API( OSErr )
  494. UpdateDragHilite                (DragReference             theDrag,
  495.                                  RgnHandle                 updateRgn)                            TWOWORDINLINE(0x7022, 0xABED);
  496.  
  497. EXTERN_API( OSErr )
  498. GetDragHiliteColor                (WindowPtr                 window,
  499.                                  RGBColor *                color)                                TWOWORDINLINE(0x7026, 0xABED);
  500.  
  501.  
  502. /*
  503.   _________________________________________________________________________________________________________
  504.       
  505.    • UTILITIES
  506.   _________________________________________________________________________________________________________
  507. */
  508.  
  509.  
  510. EXTERN_API( Boolean )
  511. WaitMouseMoved                    (Point                     initialMouse)                        TWOWORDINLINE(0x7023, 0xABED);
  512.  
  513.  
  514. EXTERN_API( OSErr )
  515. ZoomRects                        (const Rect *            fromRect,
  516.                                  const Rect *            toRect,
  517.                                  SInt16                 zoomSteps,
  518.                                  ZoomAcceleration         acceleration)                        TWOWORDINLINE(0x7024, 0xABED);
  519.  
  520. EXTERN_API( OSErr )
  521. ZoomRegion                        (RgnHandle                 region,
  522.                                  Point                     zoomDistance,
  523.                                  SInt16                 zoomSteps,
  524.                                  ZoomAcceleration         acceleration)                        TWOWORDINLINE(0x7025, 0xABED);
  525.  
  526.  
  527. /*
  528.   _________________________________________________________________________________________________________
  529.    • OLD NAMES
  530.      These are provided for compatiblity with older source bases.  It is recommended to not use them since
  531.        they may removed from this interface file at any time.
  532.   _________________________________________________________________________________________________________
  533. */
  534.  
  535. #if OLDROUTINENAMES
  536.  
  537. enum {
  538.     dragHasLeftSenderWindow        = kDragHasLeftSenderWindow,        /* drag has left the source window since TrackDrag */
  539.     dragInsideSenderApplication    = kDragInsideSenderApplication,    /* drag is occurring within the sender application */
  540.     dragInsideSenderWindow        = kDragInsideSenderWindow        /* drag is occurring within the sender window */
  541. };
  542.  
  543.  
  544. enum {
  545.     dragTrackingEnterHandler    = kDragTrackingEnterHandler,    /* drag has entered handler */
  546.     dragTrackingEnterWindow        = kDragTrackingEnterWindow,        /* drag has entered window */
  547.     dragTrackingInWindow        = kDragTrackingInWindow,        /* drag is moving within window */
  548.     dragTrackingLeaveWindow        = kDragTrackingLeaveWindow,        /* drag has exited window */
  549.     dragTrackingLeaveHandler    = kDragTrackingLeaveHandler        /* drag has exited handler */
  550. };
  551.  
  552.  
  553. enum {
  554.     dragRegionBegin                = kDragRegionBegin,                /* initialize drawing */
  555.     dragRegionDraw                = kDragRegionDraw,                /* draw drag feedback */
  556.     dragRegionHide                = kDragRegionHide,                /* hide drag feedback */
  557.     dragRegionIdle                = kDragRegionIdle,                /* drag feedback idle time */
  558.     dragRegionEnd                = kDragRegionEnd                /* end of drawing */
  559. };
  560.  
  561.  
  562. enum {
  563.     zoomNoAcceleration            = kZoomNoAcceleration,            /* use linear interpolation */
  564.     zoomAccelerate                = kZoomAccelerate,                /* ramp up step size */
  565.     zoomDecelerate                = kZoomDecelerate                /* ramp down step size */
  566. };
  567.  
  568.  
  569. enum {
  570.     kDragStandardImage            = kDragStandardTranslucency,    /* 65% image translucency (standard)*/
  571.     kDragDarkImage                = kDragDarkTranslucency,        /* 50% image translucency*/
  572.     kDragDarkerImage            = kDragDarkerTranslucency,        /* 25% image translucency*/
  573.     kDragOpaqueImage            = kDragOpaqueTranslucency        /* 0% image translucency (opaque)*/
  574. };
  575.  
  576. #endif  /* OLDROUTINENAMES */
  577.  
  578.  
  579. #if PRAGMA_STRUCT_ALIGN
  580.     #pragma options align=reset
  581. #elif PRAGMA_STRUCT_PACKPUSH
  582.     #pragma pack(pop)
  583. #elif PRAGMA_STRUCT_PACK
  584.     #pragma pack()
  585. #endif
  586.  
  587. #ifdef PRAGMA_IMPORT_OFF
  588. #pragma import off
  589. #elif PRAGMA_IMPORT
  590. #pragma import reset
  591. #endif
  592.  
  593. #ifdef __cplusplus
  594. }
  595. #endif
  596.  
  597. #endif /* __DRAG__ */
  598.  
  599.